var ts_mousex;
var ts_mousey;
var ts_IE=document.all ? true : false
var ts_vert=(typeof(ts_vertical)=="undefined")?true:false;
var ts_slow=(typeof(ts_slowdown)=="undefined")?3:ts_slowdown;
var ts_opac=(typeof(ts_opacity)=="undefined")?false:true;
var tsimg_fb="http://seoheap.com/images/1/facebook.png";
var tsimg_tw="http://seoheap.com/images/1/twitter.png";
var tsimg_su="http://seoheap.com/images/1/stumbleupon.png";
var tsimg_de="http://seoheap.com/images/1/delicious.png";
var tsimg_di="http://seoheap.com/images/1/digg.png";
var tsimg_re="http://seoheap.com/images/1/reddit.png";
var tsimg_te="http://seoheap.com/images/1/technorati.png";
tsimg_fb=(typeof(tsimg_facebook)=="undefined")?tsimg_fb:tsimg_facebook;
tsimg_tw=(typeof(tsimg_twitter)=="undefined")?tsimg_tw:tsimg_twitter;
tsimg_su=(typeof(tsimg_stumbleupon)=="undefined")?tsimg_su:tsimg_stumbleupon;
tsimg_de=(typeof(tsimg_delicious)=="undefined")?tsimg_de:tsimg_delicious;
tsimg_di=(typeof(tsimg_digg)=="undefined")?tsimg_di:tsimg_digg;
tsimg_re=(typeof(tsimg_reddit)=="undefined")?tsimg_re:tsimg_reddit;
tsimg_te=(typeof(tsimg_technorati)=="undefined")?tsimg_te:tsimg_technorati;
var tsimg_max=(typeof(ts_max)=="undefined")?32:ts_max;
var tsimg_min=(typeof(ts_min)=="undefined")?16:ts_min;
var ts_count=7;
if (tsimg_fb=="")
	ts_count-=1;
if (tsimg_tw=="")
	ts_count-=1;
if (tsimg_su=="")
	ts_count-=1;
if (tsimg_de=="")
	ts_count-=1;
if (tsimg_di=="")
	ts_count-=1;
if (tsimg_re=="")
	ts_count-=1;
if (tsimg_te=="")
	ts_count-=1;
var ts_usr1="";
if (typeof(tsuser1)!="undefined" && typeof(tsuser1_url)!="undefined") {
	ts_count+=1;
	tsuser1_title=(typeof(tsuser1_title)=="undefined")?"":tsuser1_title;
	ts_usr1='<div><img src="'+tsuser1+'" title="'+tsuser1_title+'" onclick="tsuserck(\''+tsuser1_url+'\')"></div>';
}
var ts_usr2="";
if (typeof(tsuser2)!="undefined" && typeof(tsuser2_url)!="undefined") {
	ts_count+=1;
	tsuser2_title=(typeof(tsuser2_title)=="undefined")?"":tsuser2_title;
	ts_usr2='<div><img src="'+tsuser2+'" title="'+tsuser2_title+'" onclick="tsuserck(\''+tsuser2_url+'\')"></div>';
}
var ts_usr3="";
if (typeof(tsuser3)!="undefined" && typeof(tsuser3_url)!="undefined") {
	ts_count+=1;
	tsuser3_title=(typeof(tsuser3_title)=="undefined")?"":tsuser3_title;
	ts_usr3='<div><img src="'+tsuser3+'" title="'+tsuser3_title+'" onclick="tsuserck(\''+tsuser3_url+'\')"></div>';
}
var ts_usr4="";
if (typeof(tsuser4)!="undefined" && typeof(tsuser4_url)!="undefined") {
	ts_count+=1;
	tsuser4_title=(typeof(tsuser4_title)=="undefined")?"":tsuser4_title;
	ts_usr4='<div><img src="'+tsuser4+'" title="'+tsuser4_title+'" onclick="tsuserck(\''+tsuser4_url+'\')"></div>';
}
var ts_usr5="";
if (typeof(tsuser5)!="undefined" && typeof(tsuser5_url)!="undefined") {
	ts_count+=1;
	tsuser5_title=(typeof(tsuser5_title)=="undefined")?"":tsuser5_title;
	ts_usr5='<div><img src="'+tsuser5+'" title="'+tsuser5_title+'" onclick="tsuserck(\''+tsuser5_url+'\')"></div>';
}


var ts_slowcount=0;
var ts_ids=[0];
var ts_position;
document.writeln('<style>');
document.writeln('#ts_cont {');
document.writeln('width:'+((ts_vert) ? ((tsimg_max*ts_count)+22) : (tsimg_max+22))+'px;');
document.writeln('padding-top:3px;');
document.writeln('white-space:nowrap;');
document.writeln('cursor:pointer;');
document.writeln('}');
document.writeln('#ts_cont div {');
document.writeln('float:left;');
document.writeln('width:'+tsimg_max+'px;');
document.writeln('height:'+tsimg_max+'px;');
document.writeln('text-align:center');
document.writeln('}');
document.writeln('#ts_cont div img {');
document.writeln('border:none;');
document.writeln('width:'+tsimg_min+'px;');
document.writeln('height:'+tsimg_min+'px;');
document.writeln('text-align:center;');
if (ts_opac && !ts_IE) {
	document.writeln('opacity:0.52;');
	document.writeln('-moz-opacity:0.52;');
	document.writeln('filter:alpha(52);');
}
document.writeln('}');
document.writeln('#ts_cont span img {');
document.writeln('top:0px;');
document.writeln('height:15px;');
document.writeln('position:relative;');
document.writeln('border:none;');
document.writeln('left:0px;');
document.writeln('}');
document.writeln('</style>');
document.writeln('<div id="ts_cont">');
if (tsimg_fb!="")
	document.writeln('<div onclick="ts_fb()"><img src="'+tsimg_fb+'" title="Share on Facebook!"></div>');
if (tsimg_tw!="")
	document.writeln('<div onclick="ts_tw()"><img src="'+tsimg_tw+'" title="Tweet this!"></div>');
if (tsimg_su!="")
	document.writeln('<div onclick="ts_su()"><img src="'+tsimg_su+'" title="Stumble This!"></div>');
if (tsimg_de!="")
	document.writeln('<div onclick="ts_del()"><img src="'+tsimg_de+'" title="Share on del.icio.us"></div>');
if (tsimg_di!="")
	document.writeln('<div onclick="ts_dg()"><img src="'+tsimg_di+'" title="Digg it!"></div>');
if (tsimg_re!="")
	document.writeln('<div onclick="ts_rd()"><img src="'+tsimg_re+'" title="Reddit!"></div>');
if (tsimg_te!="")
	document.writeln('<div onclick="ts_te()"><img src="'+tsimg_te+'" title="Add to Technorati"></div>');
document.writeln(ts_usr1+ts_usr2+ts_usr3+ts_usr4+ts_usr5);
document.writeln('<span><img src="http://seoheap.com/images/add.png" onclick="ts_add()" title="Add this to your site"></span>');
document.writeln('</div>');
document.writeln('<br style="clear:both">');
if (typeof(ts_translate)!="undefined") {
	document.writeln('<div id="google_translate_element"></div><scr'+'ipt>');
	document.writeln('function googleTranslateElementInit() {');
  	document.writeln('new google.translate.TranslateElement({');
    document.writeln('pageLanguage: \'en\'');
  	document.writeln('}, \'google_translate_element\');');
	document.writeln('}');
	document.writeln('</scr'+'ipt><scr'+'ipt src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></scr'+'ipt>');
}
if(window.addEventListener) {
	window.addEventListener("mousemove",ts_getmousexy,false);
	window.addEventListener("resize",ts_getposition,false);
} else {
	document.onmousemove=ts_getmousexy;
	window.onresize=ts_getposition; 
}

function tsuserck(t) {
	window.open(t);
}
function ts_tn() {
window.open('http://technorati.com/faves?add='+encodeURIComponent(ts_url),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
function ts_rd() {
window.open('http://www.reddit.com/submit?url='+encodeURIComponent(ts_url),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
function ts_fb() {
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(ts_url)+'&t='+encodeURIComponent(ts_title),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
function ts_del() {
window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(ts_url)+'&title='+encodeURIComponent(ts_title),'sharer','toolbar=0,status=0,width=550,height=550');
return false;
}
function ts_dg() {
window.open('http://digg.com/submit?url='+encodeURIComponent(ts_url)+'&title='+encodeURIComponent(ts_title),'sharer');
return false;
}
function ts_tw() {
window.open('http://seoheap.com/twitter.php?status='+encodeURIComponent(ts_title)+'&ac='+encodeURIComponent(ts_twitter)+'&url='+encodeURIComponent(ts_url),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
function ts_su() {
window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(ts_url),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
function ts_te() {
window.open('http://technorati.com/faves?add='+encodeURIComponent(ts_url),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
function ts_add() {
	window.location.href="http://cetek.web.id";
}
function ts_getmousexy(e) {
	ts_slowcount++;
	if (ts_slowcount>ts_slow) {
		ts_getmousexys(e)
		ts_slowcount=0;
	}
}
function ts_getposition() {
	var id=document.getElementById("ts_cont");
    if (ts_vert)
  		ts_position=ts_findpos(id)[0]-(tsimg_max/2);
   	else
 		ts_position=ts_findpos(id)[1]-(tsimg_max/2);	
}
function ts_getmousexys(e) {
  if (ts_IE) {
    ts_mousex = event.clientX + document.body.scrollLeft
    ts_mousey = event.clientY + document.body.scrollTop
  } else {
    ts_mousex = e.pageX
    ts_mousey = e.pageY
  }  
  if (ts_mousex < 0){ts_mousex = 0}
  if (ts_mousey < 0){ts_mousey = 0}
  var h;
  var o;
  var j;
  var id=document.getElementById("ts_cont");
  if (typeof(ts_ids[n+1])=="undefined") {
  	ts_ids[1]=ts_getfirstnode(id,"DIV");
    ts_getposition();
  }
  if (ts_vert)
  		g=ts_mousex-ts_position;
   	else
 		g=ts_mousey-ts_position; 
  for (var n=1; n<=ts_count; n++) {
	h=(n*tsimg_max)-g-tsimg_max;
	h=h/(tsimg_max/8);
	h+=tsimg_max/4;
	h=tsimg_max-h
	if (h>tsimg_max)
	  h=tsimg_max-(h-tsimg_max);
	j=h;
	if (j<0)
		j=0;
	if (h<tsimg_min)
	  h=tsimg_min;
	ts_ids[n].childNodes[0].style.height=h+'px';
	ts_ids[n].childNodes[0].style.width=h+'px';
	if (ts_opac && !ts_IE) {
		o=52+(j);
		ts_ids[n].childNodes[0].style.opacity=(o/100);
		ts_ids[n].childNodes[0].style.MozOpacity=(o/100);
		ts_ids[n].childNodes[0].style.filter='alpha(opacity='+o+')';
	}
	if (typeof(ts_ids[n+1])=="undefined")
		ts_ids[n+1]=ts_getnext(ts_ids[n]);
  }
  return true
}
function ts_findpos(obj) {
	if (obj==null)
		return [0,0];
	var curleft = curtop = 0;
	if (obj.offsetParent) {
	do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	return [curleft,curtop];
}
function ts_getfirstnode(h,tag) {
h=h.childNodes;
for(var i=0;i<h.length; i++) {
	if (typeof(h[i].tagName)!='undefined' && h[i].tagName==tag) {
		return h[i];
	}
}
return null;
}
function ts_getnext(idno) {
	var i = idno.nextSibling;
	while(i.innerHTML == null) {
		i=i.nextSibling;
	}
	return i;
}